package com.gexin.model.user;

import com.gexin.model.user.base.BaseUserAccount;

/**
 * 业务名称:  t_user_account(账户金额信息) 
 */
@SuppressWarnings("serial")
public class UserAccount extends BaseUserAccount<UserAccount> {
	public static final UserAccount dao = new UserAccount();

	public UserAccount findByUser(Integer user_id){
		UserAccount account =UserAccount.dao.findById(user_id);
		if(account==null){
			UserAccount account2= new UserAccount();
			account2.setUserId(user_id);
			account2.setState(0);
			account2.save();
			UserAccount account3 =UserAccount.dao.findById(user_id);
			return account3;
		}
		return account;
	}
}
